import { createRouter,createWebHistory } from "vue-router";

import LoginVue from '@/views/login.vue'
import LayoutVue from '@/views/layout.vue'

import ArticleCategoryVue from '@/views/article/ArticleCategory.vue'
import ArticleCleManageVue from '@/views/article/ArticleManage.vue'
// import ScheduleVue from '@/views/article/Schedule.vue'
import UserAvatarVue from '@/views/user/UserAvatar.vue'
import UserInfoVue from '@/views/user/UserInfo.vue'
import classTableVue from '@/views/article/classTable.vue'
import UserResetPasswordVue from '@/views/user/UserResetPassword.vue'
//定义路由关系
const routes=[
    {path:'/login',component:LoginVue},
    {path:'/',component:LayoutVue,redirect:'article/category',children:[
        {path:'/article/category',component:ArticleCategoryVue},
        {path:'/article/manage',component:ArticleCleManageVue},
        {path:'/article/schedule',component:classTableVue},
        {path:'/user/avatar',component:UserAvatarVue},
        {path:'/user/info',component:UserInfoVue},
        {path:'/user/resetpassword',component:UserResetPasswordVue}

    ]}
]

//创建路由器
const router=createRouter({
    history:createWebHistory(),
    routes: routes
})

export default router